<template>
    <div class="application">
        <div class="content">
            <!--            轮播图-->
            <swiper auto  loop class="text-scroll" :show-dots="false">
                <swiper-item v-for="(item,index) in banners" :key="index">
                    <div class="banner-box">
                        <img :src="item" alt="">
                    </div>
                </swiper-item>
            </swiper>
            <!--            菜单-->
            <ul class="menus">
                <router-link :to="item.path" tag="li" v-for="(item,index) in menus" :key="index">
                   	<i class="iconfont" :class="item.icon" :style="'color:#'+item.color"></i>
                    <p>{{item.name}}</p>
                </router-link>
            </ul>
        </div>
    </div>
</template>

<script>
    import { Swiper, SwiperItem} from 'vux'
    export default {
        name: "index",
        components:{Swiper, SwiperItem},
        data(){
            return {
                banners:[require('../../assets/img/banner2.jpg')],
                menus:[
                    {name:'年度考核',icon:"iconganbuniandukaohe",path:'/kaohe',color:"1296db"},
//                  {name:'签到',icon:'iconqiandao',path:'',color:"f4ea29"},
                    {name:'',icon:'',path:'/kaohe',color:"f4ea29"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                    {name:'',icon:'',path:'/kaohe',color:"1296db"},
                ]
            }
        },
        mounted(){

        },
        methods:{

        }
    }
</script>

<style scoped lang="less">
    .application{
        .banner-box{
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            img{
                width: 100%;
            }
        }
        .menus{
            width: 100%;
            border:1px solid #ddd;
            margin-top: 15px;
            box-sizing: border-box;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            li{
                width: 25%;
                height:95px;
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                border-right:1px solid #ddd;
                border-bottom:1px solid #ddd;
                box-sizing: border-box;
                &:nth-child(4n){
                    border-right: 0;
                }
                &:nth-child(-4+n){
                    border-bottom: 0;
                }
                i{
                    font-size: 36px;
                }
                p{
                    font-size: 14px;
                    color:#666;
                    margin-top: 10px;
                }
            }
        }
    }
</style>